package person.lance.regexandgame.game.common;

import jdk.nashorn.internal.objects.annotations.Setter;

public abstract class Role implements Injure {
    boolean isDeath;
    int bloodVolume;
    int defenses;
    int atk;

    @Override
    public void buckleBlood(int atk) {
        if (!isDeath) {
            bloodVolume -= (atk - atk);
        }
        if (bloodVolume <= 0) {
           death();
        }
    }

    @Override
    public void death() {
        isDeath = true;
    }

    public boolean isDeath() {
        return isDeath;
    }

    public void setDeath(boolean death) {
        isDeath = death;
    }

    public int getBloodVolume() {
        return bloodVolume;
    }

    public void setBloodVolume(int bloodVolume) {
        this.bloodVolume = bloodVolume;
    }

    public int getDefenses() {
        return defenses;
    }

    public void setDefenses(int defenses) {
        this.defenses = defenses;
    }

    public int getAtk() {
        return atk;
    }

    public void setAtk(int atk) {
        this.atk = atk;
    }
}
